POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 12:17:10 EDT (-0400)
  Re: Object Oriented POV code  
From: Dan P
Date: 18 Feb 2004 16:08:53
Message: <4033d465$1@news.povray.org>
"Tom Melly" <pov### [at] tomandlucouk> wrote in message
news:4033cd07@news.povray.org...
> andrel wrote:
>
> > is better left out. At this point I cannot judge very well because I
> > still have no good perception of how an OOPOV would look, but perhaps
>
> There's a challenge... Warp? What would, IYHO, a bit of Pov-OO look like?

I'm sorry; I know you didn't ask me. I have some ideas of how it could look:


object ColoredSphere (v, c) inherits Sphere
{
    pigment
    {
        color = c
    }
}

object red_sphere = new ColoredSphere (<1, -2, 3>, new Color(1, 0, 0))
object green_sphere = new ColoredSphere (<2, -2, 3>, new Color(0, 1, 0))

show red_sphere
show green_sphere


Off the top of my head, I could see this being useful. You could also do
this:

red_sphere.pigment.color = new Color.White

which you can't do right now.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.